<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>twoPhaseEulerFoam 全解读之三 | Giskard&#39;s CFD Learning Tricks</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="本系列将对OpenFOAM-2.1.1 中的 twoPhaseEulerFoam 求解器进行完全解读，共分三部分：方程推导，代码解读，补充说明。本篇对 twoPhaseEulerFoam 中的 alphaEqn.H 进行详细地的解读，并作一些补充说明。">
<meta property="og:type" content="article">
<meta property="og:title" content="twoPhaseEulerFoam 全解读之三">
<meta property="og:url" content="http://xiaopingqiu.github.io/2015/06/27/twoPhaseEulerFoam3/index.html">
<meta property="og:site_name" content="Giskard's CFD Learning Tricks">
<meta property="og:description" content="本系列将对OpenFOAM-2.1.1 中的 twoPhaseEulerFoam 求解器进行完全解读，共分三部分：方程推导，代码解读，补充说明。本篇对 twoPhaseEulerFoam 中的 alphaEqn.H 进行详细地的解读，并作一些补充说明。">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="twoPhaseEulerFoam 全解读之三">
<meta name="twitter:description" content="本系列将对OpenFOAM-2.1.1 中的 twoPhaseEulerFoam 求解器进行完全解读，共分三部分：方程推导，代码解读，补充说明。本篇对 twoPhaseEulerFoam 中的 alphaEqn.H 进行详细地的解读，并作一些补充说明。">
  
  
    <link rel="icon" href="/favicon.png">
  
  <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/css/style.css" type="text/css">
  
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

##ga('create', '[object Object]', 'auto');
ga('create', 'UA-62501686-1', 'auto');
ga('send', 'pageview');

</script>
<!-- End Google Analytics -->


</head>
<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Giskard&#39;s CFD Learning Tricks</a>
      </h1>
      
        <h2 id="subtitle-wrap">
          <a href="/" id="subtitle">CFD and Scientific Computing</a>
        </h2>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
          <a class="main-nav-link" href="/atom.xml">Rss</a>
        
          <a class="main-nav-link" href="/about">About</a>
        
      </nav>
      <nav id="sub-nav">
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="q" value="site:http://xiaopingqiu.github.io"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-twoPhaseEulerFoam3" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2015/06/27/twoPhaseEulerFoam3/" class="article-date">
  <time datetime="2015-06-27T12:39:01.000Z" itemprop="datePublished">2015-06-27</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/OpenFOAM/">OpenFOAM</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      twoPhaseEulerFoam 全解读之三
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>本系列将对OpenFOAM-2.1.1 中的 <code>twoPhaseEulerFoam</code> 求解器进行完全解读，共分三部分：方程推导，代码解读，补充说明。本篇对 <code>twoPhaseEulerFoam</code> 中的 <code>alphaEqn.H</code> 进行详细地的解读，并作一些补充说明。</p>
<a id="more"></a>
<h3 id="2-3-_alphaEqn">2.3. alphaEqn</h3><p>前文提到，经过求解 <code>pEqn</code>，并修正速度<code>Ua</code>和<code>Ub</code>以后，总体的连续性便得到了保证。为了得到分散相的体积分率<code>alpha</code>，还需要利用得到的速度场来求解分散相的连续性方程，即<code>alphaEqn</code>。分散相连续性方程可以表达如下：<br>$$<br>\frac{\partial \alpha_a}{\partial t}+\nabla \cdot (\alpha_a U_a)=0<br>$$</p>
<p>为了让每一项都写成守恒形式，并且保证$\alpha_a$的有界性，Weller 将分散相连续性方程写成如下形式<br>$$<br>\frac{\partial \alpha_a}{\partial t}+\nabla \cdot (\alpha_a U)+\nabla \cdot(U_r\alpha_a(1-\alpha_a))=0<br>$$<br>其中<br>$$<br>U=\alpha_a U_a + \alpha_b U_b \\<br>U_r=U_a-U_b<br>$$<br>OpenFOAM-2.1.1 的<code>alphaEqn</code>求解的正是 Weller 提出的形式。主要的代码如下：<br><figure class="highlight lisp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">fvScalarMatrix alphaEqn</span><br><span class="line">       <span class="list">(</span><br><span class="line">            <span class="keyword">fvm</span>:<span class="keyword">:ddt</span><span class="list">(<span class="keyword">alpha</span>)</span></span><br><span class="line">          + fvm:<span class="keyword">:div</span><span class="list">(<span class="keyword">phic</span>, alpha, scheme)</span></span><br><span class="line">          + fvm:<span class="keyword">:div</span><span class="list">(<span class="keyword">-fvc</span>:<span class="keyword">:flux</span><span class="list">(<span class="keyword">-phir</span>, beta, schemer)</span>, alpha, schemer)</span></span><br><span class="line">       )</span><span class="comment">;</span></span><br></pre></td></tr></table></figure></p>
<p>其中<code>phic</code>与<code>phir</code>的定义如下：<br><figure class="highlight aspectj"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="function">surfaceScalarField <span class="title">phic</span><span class="params">(<span class="string">"phic"</span>, phi)</span></span>;</span><br><span class="line"><span class="function">surfaceScalarField <span class="title">phir</span><span class="params">(<span class="string">"phir"</span>, phia - phib)</span></span>;</span><br></pre></td></tr></table></figure></p>
<p>得到分散相体积分率后，连续相体积分率$\alpha_b$则为$1-\alpha_a$，如下<br><figure class="highlight stata"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">beta = <span class="literal">scalar</span>(1) - <span class="keyword">alpha</span>;</span><br></pre></td></tr></table></figure></p>
<h2 id="3-_补充说明">3. 补充说明</h2><p>想必读者肯定发现了，我前面的代码解读相比于<code>twoPhaseEulerFoam</code>的源码其实省略了很多，总体上来讲，省略了三大块，一是跟<code>kineticTheory</code>相关的，二是跟<code>g0</code>相关的，三是<code>packingLimiter</code>，下面对这三部分进行一些补充说明。</p>
<h3 id="3-1_kineticTheory">3.1 kineticTheory</h3><p><code>kineticTheory</code>是 KTGF(Kinetic Theory of Granular Flow) 方法在OpenFOAM-2.1.1里的实现。KTGF 的主要作用是计算固相压力和固相粘度，以封闭前述的分散相动量方程，所以<code>kineticTheory</code>只有在模拟气固（液固）两相流时才需要开启。 <code>kineticTheory</code> 是否开启以及 KTGF 模型的参数需要在算例的<code>constant/kineticTheoryProperties</code>文件里进行设置。如果开启了<code>kineticTheory</code>，主要的影响如下：</p>
<ul>
<li><p>UEqn.H</p>
<figure class="highlight ocaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> (kineticTheory.on<span class="literal">()</span>)</span><br><span class="line">&#123;</span><br><span class="line">    kineticTheory.solve(gradUaT);</span><br><span class="line">    nuEffa = kineticTheory.mua<span class="literal">()</span>/rhoa;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>如果开启<code>kineticTheory</code>，则固相粘度<code>nuEffa</code>是由 KTGF 来计算得到，否则<code>nuEffa</code>是用一个简单的关联式来计算</p>
<figure class="highlight perl"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">else</span></span><br><span class="line">&#123;</span><br><span class="line">    nuEffa = <span class="keyword">s</span><span class="string">qr(Ct)</span>*nutb + nua;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>此外，<code>Rca</code>项也要加上额外的项</p>
<figure class="highlight delphi"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> (kineticTheory.<span class="keyword">on</span>())</span><br><span class="line"><span class="comment">&#123;</span><br><span class="line">    Rca -= ((kineticTheory.lambda()/rhoa)*tr(gradUaT))*tensor(I);</span><br><span class="line">&#125;</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>pEqn.H<br>如果<code>kineticTheory</code>开启了，则要在压力修正方程中加上额外的固相压力项。</p>
<figure class="highlight aspectj"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> (kineticTheory.on())</span><br><span class="line">&#123;</span><br><span class="line">    phiDraga -= rUaAf*fvc::snGrad(kineticTheory.pa()/rhoa)*mesh.magSf();</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ul>
<p>有关 OpenFOAM 中使用的 KTGF 模型的理论可以参考<a href="http://repository.tudelft.nl/view/ir/uuid%3A919e2efa-5db2-40e6-9082-83b1416709a6/" target="_blank" rel="external">Derivation, Implementation, and Validation of Computer Simulation Models for Gas-Solid Fluidized Beds</a>，以及B.G.M. van Wachem 的其他相关论文。</p>
<h3 id="3-2_g0">3.2 g0</h3><p>跟 <code>kineticTheory</code>一样，<code>g0</code> 也是只有在模拟气固（液固）两相流时才需要开启，相关的设置在<code>constant/ppProperties</code>里，当<code>g0</code>的值设置为大于零时，则跟<code>g0</code>相关的项会其作用，主要的影响如下：</p>
<ul>
<li><p>pEqn</p>
<figure class="highlight ocaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> (g0.<span class="keyword">value</span><span class="literal">()</span> &gt; <span class="number">0.0</span>)</span><br><span class="line">&#123;</span><br><span class="line">    phiDraga -= ppMagf*fvc::snGrad(alpha)*mesh.magSf<span class="literal">()</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>其中<code>ppMagf</code>的定义如下：</p>
<figure class="highlight gherkin"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">ppMagf = rUaAf<span class="keyword">*</span>fvc::interpolate</span><br><span class="line">(</span><br><span class="line"> (1.0/(rhoa<span class="keyword">*</span>(alpha + scalar(0.0001))))</span><br><span class="line"> <span class="keyword">*</span>g0<span class="keyword">*</span>min(exp(preAlphaExp<span class="keyword">*</span>(alpha - alphaMax)), expMax)</span><br><span class="line">);</span><br></pre></td></tr></table></figure>
<p>这一段的效果，相当于在<a href="http://xiaopingqiu.github.io/2015/05/17/twoPhaseEulerFoam1/" target="_blank" rel="external">本系列第一篇</a>最后的分散相动量方程的等式右边额外增加一项：<br>$$<br>-g0*min(e^{preAlphaExp*(\alpha_a - \alpha_{Max})},expMax)\nabla \alpha_a / (\alpha_a \rho_a)<br>$$<br>可见，这一项的作用是给固相额外施加了一个力，可以认为是固相压力，这个力与$\alpha_a$的梯度有关，且与梯度的方向相反。<br>注意这一项的特点：<code>g0</code>, <code>preAlphaExp</code>, <code>alphaMax</code>, <code>expMax</code> 都是需要用户指定的参数，一般将<code>g0</code>, <code>preAlphaExp</code>和<code>expMax</code>设置为一个比较大的正整数（$10^3$的量级），当<code>alpha - alphaMax &lt; 0</code>时，$e^{\,preAlphaExp*(\alpha_a - \alpha_{Max})}$ 将是一个很小的数，此时整个增加的一项也将是一个较小的数，所以，<code>alpha - alphaMax &lt; 0</code>时额外增加的那一项对动量方程的贡献很小。但是，当<code>alpha - alphaMax &gt; 0</code>时，随着 <code>alpha</code> 偏离 <code>alphaMax</code> 越来越远，<code>exp(preAlphaExp*(alpha - alphaMax)</code>将迅速增大，<code>min(exp(preAlphaExp*(alpha - alphaMax)), expMax)</code>的值也将迅速增大，直到设定值<code>expMax</code>。可见，<code>g0</code>项的作用可以理解为为了防止固相过度堆积。气固系统中，固相的体积分率是有上限的，可以将<code>alphaMax</code>设置为这个上限值，当某个网格里的<code>alpha</code>超过设定的<code>alphaMax</code>时，就让固相迅速弹开，以防止固相体积分率过大。</p>
</li>
<li><p>alphaEqn.H<br>alphaEqn.H 里有两处跟 <code>g0</code> 有关的，<br>一处是对 <code>phic</code> 和 <code>phir</code> 进行修正：</p>
<figure class="highlight aspectj"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> (g0.value() &gt; <span class="number">0.0</span>)</span><br><span class="line">&#123;</span><br><span class="line">    surfaceScalarField alphaf(fvc::interpolate(alpha));</span><br><span class="line">    surfaceScalarField phipp(ppMagf*fvc::snGrad(alpha)*mesh.magSf());</span><br><span class="line">    phir += phipp;</span><br><span class="line">    phic += fvc::interpolate(alpha)*phipp;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
</ul>
<p>另一处是对 <code>alphaEqn</code> 进行修正：<br><figure class="highlight aspectj"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> (g0.value() &gt; <span class="number">0.0</span>)</span><br><span class="line">&#123;</span><br><span class="line">    ppMagf = rUaAf*fvc::interpolate</span><br><span class="line">    (</span><br><span class="line">     (1.0/(rhoa*(alpha + scalar(0.0001))))</span><br><span class="line">     *g0*min(exp(preAlphaExp*(alpha - alphaMax)), expMax)</span><br><span class="line">     );</span><br><span class="line">    </span><br><span class="line">    alphaEqn -= fvm::laplacian</span><br><span class="line">    (</span><br><span class="line">     (fvc::interpolate(alpha) + scalar(0.0001))*ppMagf,</span><br><span class="line">     alpha,</span><br><span class="line">     <span class="string">"laplacian(alphaPpMag,alpha)"</span></span><br><span class="line">     );</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>为什么当 <code>g0 &gt; 0</code> 时，需要在 <code>alphaEqn</code> 中额外减去一个 <code>laplacian</code> 项呢？这里要结合上面提到的两段代码来进行分析。<br>在对 <code>phic</code> 和 <code>phir</code> 进行修正这一段， <code>phic</code> 和 <code>phir</code> 分别加上了一项。将修正过的 <code>phic</code> 和 <code>phir</code> 代入到 <code>alphaEqn</code> 中，会导致 <code>alphaEqn</code> 与上文的分散相连续性方程<br>$$<br>\frac{\partial \alpha_a}{\partial t}+\nabla \cdot (\alpha_a U)+\nabla \cdot(U_r\alpha_a(1-\alpha_a))=0<br>$$<br>不一致，其中 <code>alphaEqn</code> 多出了几项：<br>其中<br><code>fvm::div(phic, alpha, scheme)</code> 比 $ \nabla \cdot (\alpha_a U) $ 多了 <code>fvm::div(alphaf*phipp, alpha, scheme)</code> 一项，写成公式，就是 $ \nabla \cdot [\alpha (\alpha *\mathrm{ppMagf}) \nabla \alpha] $ 。</p>
<p>而 <code>fvm::div(-fvc::flux(-phir, beta, schemer), alpha, schemer)</code> 则比 $ \nabla \cdot (\alpha_a U)+\nabla \cdot(U_r\alpha_a(1-\alpha_a) $ 多出了 <code>fvm::div(-fvc::flux(-phipp, beta, schemer), alpha, schemer)</code> 一项，写成公式就是 $ \nabla \cdot [\alpha (\beta *\mathrm{ppMagf}) \nabla \alpha] $ 。<br>多出的这两项加起来，为<br>$$<br>\nabla \cdot [\alpha  *\mathrm{ppMagf} \  \nabla \alpha]<br>$$</p>
<p>对比上面的 <code>alphaEqn</code> 减去的 <code>laplacian</code> 项，会发现这一项跟那个 <code>laplacian</code> 是一样的。</p>
<p>所以，<code>g0 &gt; 0</code> 时，先将固相压力带来的通量代入到 <code>alphaEqn</code> 的构建中，然后再减去对应的 <code>laplacian</code> 项，这么做的目的，应该是为了计算稳定性以及保证 <code>alpha</code> 的有界性（保证 $0&lt;alpha&lt;alphaMax$）。但是这背后的数值原理，我也没有完全理解。</p>
<p>最后，有必要说明一下，<code>g0</code>相关的项其实就是在动量方程中增加了一项颗粒压力，想要达到的效果是防止固相过度堆积。<code>kineticTheory</code>开启后将计算颗粒相的应力，其中包括了颗粒相压力。所以 <code>g0</code>可以当作 KTGF 的某种简单的替代。从原理上讲，<code>kineticTheory</code>和<code>g0</code>不应该同时开启。</p>
<h3 id="3-3_packingLimiter">3.3 packingLimiter</h3><p>packingLimiter 的作用，从名字可以看出，也是用来处理过度堆积问题的。packingLimiter 缺乏理论基础，仅仅是一种不甚高明的数值技巧，其主要的处理是定义了一个<br><figure class="highlight lisp"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">volScalarField alphaEx<span class="list">(<span class="keyword">max</span><span class="list">(<span class="keyword">alpha</span> - alphaMax, scalar<span class="list">(<span class="number">0</span>)</span>)</span>)</span><span class="comment">;</span></span><br></pre></td></tr></table></figure></p>
<p>当<code>alpha - alphaMax &gt; 0</code>时，<code>alphaEx = alpha - alphaMax &gt; 0</code>，否则<code>alphaEx = 0</code>。<br>packingLimiter 本质操作是，当某个网格的固相体积分率超过设定的最大值时，就让该网格的固相往它的邻居网格匀一匀，就是这么简(ren)单(xing)。所以，一般情况下，不建议开启packingLimiter。</p>
<p>至此，OpenFOAM-2.1.1 版本的<code>twoPhaseEulerFoam</code>便解读完了。最近的 OpenFOAM-2.3 系列中的<code>twoPhaseEulerFoam</code> 变化很大，求解的是全守恒形式的动量方程了（而不是 phase-intensive形式的），耦合了传热模型，考虑了可压缩效应，而且alphaEqn的求解不再是利用隐式迭代的方式，而是改成了用 MULES 方法来求解。这些有待于下一步进行解读。</p>
<h2 id="参考资料">参考资料</h2><ol>
<li>Henrik Rusche， PHD Thesis， Computational Fluid Dynamics of Dispersed Two-Phase Flows at High Phase Fractions， Imperial College of Science, Technology &amp; Medicine, Department of Mechanical Engineering, 2002</li>
<li><a href="https://openfoamwiki.net/index.php/BubbleFoam" target="_blank" rel="external">https://openfoamwiki.net/index.php/BubbleFoam</a></li>
</ol>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://xiaopingqiu.github.io/2015/06/27/twoPhaseEulerFoam3/" data-id="cj2lay30k000rkkmbb22di6e9" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Code-Explained/">Code Explained</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/OpenFOAM/">OpenFOAM</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2015/08/16/vimExtensionOpenFOAM/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          vim Extension for OpenFOAM
        
      </div>
    </a>
  
  
    <a href="/2015/06/14/OpenFOAM-on-win/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">在 Windows 7 下配置 OpenFOAM 运行环境</div>
    </a>
  
</nav>

  
</article>


<section id="comments">
  <!-- 多说评论框 start -->
  <div class="ds-thread" data-thread-key="post-twoPhaseEulerFoam3" data-title="twoPhaseEulerFoam 全解读之三" data-url="http://xiaopingqiu.github.io/2015/06/27/twoPhaseEulerFoam3/"></div>
  <!-- 多说评论框 end -->
  <!-- 多说公共JS代码 start (一个网页只需插入一次) -->
  <script type="text/javascript">
  var duoshuoQuery = {short_name:"xiaopingqiu"};
	(function() {
		var ds = document.createElement('script');
		ds.type = 'text/javascript';ds.async = true;
		ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
		ds.charset = 'UTF-8';
		(document.getElementsByTagName('head')[0] 
		 || document.getElementsByTagName('body')[0]).appendChild(ds);
	})();
	</script>
  <!-- 多说公共JS代码 end -->
</section>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/C/">C++</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/DEM/">DEM</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/OpenFOAM/">OpenFOAM</a><span class="category-list-count">44</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Paraview/">Paraview</a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/swak4Foam/">swak4Foam</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/test/">test</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/vim/">vim</a><span class="category-list-count">1</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Boundary-conditions/">Boundary conditions</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/C/">C++</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/CentOS/">CentOS</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Code-Explained/">Code Explained</a><span class="tag-list-count">29</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/LES/">LES</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/LIGGGHTS/">LIGGGHTS</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/ODE/">ODE</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/OpenFOAM/">OpenFOAM</a><span class="tag-list-count">20</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Postprocessing/">Postprocessing</a><span class="tag-list-count">9</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Preprocessing/">Preprocessing</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/RTS/">RTS</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/TIL/">TIL</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Windows/">Windows</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/fvOptions/">fvOptions</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/groovyBC/">groovyBC</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/paraview/">paraview</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/test/">test</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/thermophysicalModels/">thermophysicalModels</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/turbulence-model/">turbulence model</a><span class="tag-list-count">7</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/vim/">vim</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/wall-functions/">wall functions</a><span class="tag-list-count">4</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/Boundary-conditions/" style="font-size: 15.56px;">Boundary conditions</a><a href="/tags/C/" style="font-size: 11.11px;">C++</a><a href="/tags/CentOS/" style="font-size: 10px;">CentOS</a><a href="/tags/Code-Explained/" style="font-size: 20px;">Code Explained</a><a href="/tags/LES/" style="font-size: 10px;">LES</a><a href="/tags/LIGGGHTS/" style="font-size: 10px;">LIGGGHTS</a><a href="/tags/ODE/" style="font-size: 10px;">ODE</a><a href="/tags/OpenFOAM/" style="font-size: 18.89px;">OpenFOAM</a><a href="/tags/Postprocessing/" style="font-size: 17.78px;">Postprocessing</a><a href="/tags/Preprocessing/" style="font-size: 11.11px;">Preprocessing</a><a href="/tags/RTS/" style="font-size: 12.22px;">RTS</a><a href="/tags/TIL/" style="font-size: 10px;">TIL</a><a href="/tags/Windows/" style="font-size: 10px;">Windows</a><a href="/tags/fvOptions/" style="font-size: 11.11px;">fvOptions</a><a href="/tags/groovyBC/" style="font-size: 10px;">groovyBC</a><a href="/tags/paraview/" style="font-size: 10px;">paraview</a><a href="/tags/test/" style="font-size: 11.11px;">test</a><a href="/tags/thermophysicalModels/" style="font-size: 14.44px;">thermophysicalModels</a><a href="/tags/turbulence-model/" style="font-size: 16.67px;">turbulence model</a><a href="/tags/vim/" style="font-size: 10px;">vim</a><a href="/tags/wall-functions/" style="font-size: 13.33px;">wall functions</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/05/">五月 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/08/">八月 2016</a><span class="archive-list-count">8</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/06/">六月 2016</a><span class="archive-list-count">5</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/05/">五月 2016</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/04/">四月 2016</a><span class="archive-list-count">12</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/03/">三月 2016</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/12/">十二月 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/11/">十一月 2015</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/10/">十月 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/09/">九月 2015</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/08/">八月 2015</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/06/">六月 2015</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/05/">五月 2015</a><span class="archive-list-count">6</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/04/">四月 2015</a><span class="archive-list-count">2</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recents</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2017/05/12/duoshuoAnnouncement/">多说评论系统将停止提供服务</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewScritps/">Paraview 脚本一例</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewCamera/">Paraview 中有关 Camera 的操作两例</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewCustomFilter/">Paraview 中创建 Custom Filter</a>
          </li>
        
          <li>
            <a href="/2016/08/27/ParaviewStreamLineOnSlice/">在 Paraview 中画截面上的流线</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2017 Giskard Q.<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

<script src="//dn-lbstatics.qbox.me/lbservice/busuanzi/2.0/busuanzi.mini.js"/></script>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
    <a href="/atom.xml" class="mobile-nav-link">Rss</a>
  
    <a href="/about" class="mobile-nav-link">About</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css">
  <script src="/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>


<script src="/js/script.js" type="text/javascript"></script>

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-62501686-1', 'auto');
  ga('send', 'pageview');

</script>

  </div>
<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</body>
</html>